export const levelConfig = {
  // 用户等级配置
  user: {
    maxLevel: 100,
    expRatio: 1000, // 每1000经验值1级
    expSources: {
      watch: 1, // 每分钟观看经验
      chat: 2, // 每条聊天消息经验
      gift: 10, // 每次送礼经验
      dailySign: 100, // 每日签到经验
      follow: 50, // 关注主播经验
      share: 30, // 分享直播间经验
    },
  },

  // 主播等级配置
  anchor: {
    maxLevel: 100,
    expRatio: 2000,
    expSources: {
      stream: 2, // 每分钟直播经验
      gift: 20, // 每收到一次礼物经验
      newFollower: 100, // 每个新粉丝经验
      subscription: 500, // 每个新订阅者经验
    },
  },

  // 等级特权
  privileges: {
    chat: {
      colorful: 5, // 5级解锁彩色弹幕
      image: 10, // 10级解锁图片消息
      frequency: [
        { level: 0, limit: 3 }, // 每秒3条消息
        { level: 10, limit: 5 }, // 10级每秒5条
        { level: 30, limit: 10 }, // 30级每秒10条
      ],
    },
    gift: {
      special: 20, // 20级解锁特殊礼物
      discount: [
        { level: 10, rate: 0.95 }, // 10级95折
        { level: 30, rate: 0.9 }, // 30级9折
        { level: 50, rate: 0.85 }, // 50级85折
      ],
    },
  },
}

// 成就系统
export const achievements = {
  watch: [
    { id: 'watch_1h', name: '初来乍到', desc: '累计观看1小时', exp: 100 },
    { id: 'watch_10h', name: '忠实观众', desc: '累计观看10小时', exp: 500 },
    { id: 'watch_100h', name: '铁杆粉丝', desc: '累计观看100小时', exp: 2000 },
  ],
  gift: [
    { id: 'gift_first', name: '首次赠礼', desc: '首次送出礼物', exp: 100 },
    { id: 'gift_10', name: '慷慨大方', desc: '送出10次礼物', exp: 300 },
    { id: 'gift_100', name: '土豪', desc: '送出100次礼物', exp: 1000 },
  ],
  social: [
    { id: 'follow_10', name: '社交达人', desc: '关注10个主播', exp: 200 },
    { id: 'followers_100', name: '人气之星', desc: '获得100个粉丝', exp: 500 },
    { id: 'share_10', name: '分享达人', desc: '分享10次直播间', exp: 300 },
  ],
  anchor: [
    { id: 'stream_10h', name: '初级主播', desc: '累计直播10小时', exp: 500 },
    { id: 'stream_100h', name: '专业主播', desc: '累计直播100小时', exp: 2000 },
    { id: 'income_10k', name: '人气主播', desc: '累计收入1万虚拟币', exp: 1000 },
  ],
}

// 徽章系统
export const badges = {
  level: [
    {
      id: 'lv10',
      name: '十级成就',
      icon: '/badges/level_10.png',
      requirement: { type: 'level', value: 10 },
    },
    {
      id: 'lv50',
      name: '五十级成就',
      icon: '/badges/level_50.png',
      requirement: { type: 'level', value: 50 },
    },
  ],
  anchor: [
    {
      id: 'new_anchor',
      name: '新晋主播',
      icon: '/badges/new_anchor.png',
      requirement: { type: 'stream_time', value: 0 },
    },
    {
      id: 'pro_anchor',
      name: '专业主播',
      icon: '/badges/pro_anchor.png',
      requirement: { type: 'stream_time', value: 100 },
    },
  ],
  vip: [
    {
      id: 'vip1',
      name: 'VIP会员',
      icon: '/badges/vip1.png',
      requirement: { type: 'subscription', value: 1 },
    },
    {
      id: 'vip_year',
      name: '年度会员',
      icon: '/badges/vip_year.png',
      requirement: { type: 'subscription_months', value: 12 },
    },
  ],
}
